.class public Lcom/netease/newsreader/activity/MainIndexActivity;
.super Lcom/netease/newsreader/activity/BaseActivity;
.source "MainIndexActivity.java"


# instance fields
.field private final COVER:I

.field public FORCE_GUIDE_NAME:Ljava/lang/String;

.field public FORCE_TEXTSIZE_NAME:Ljava/lang/String;

.field private final NORMAL:I

.field private final NOTICE:I

.field private final STOP:I

.field private final UPDATE:I

.field private final UPDATETYPE:Ljava/lang/String;

.field private cover_end:Ljava/lang/String;

.field private cover_src:Ljava/lang/String;

.field private cover_start:Ljava/lang/String;

.field private currentdate:Ljava/lang/String;

.field private custom_default:Lorg/json/JSONArray;

.field private delaymillios:I

.field private delaystart:Ljava/lang/Runnable;

.field private dialog:Landroid/app/AlertDialog;

.field private handler:Landroid/os/Handler;

.field private iscancle:Z

.field private message:Ljava/lang/String;

.field private sp:Landroid/content/SharedPreferences;

.field private stopflag:Z

.field private title:Ljava/lang/String;

.field private type:Ljava/lang/String;

.field private version:Ljava/lang/String;

.field private viewstub_ad:Landroid/view/ViewStub;


# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 49
    invoke-direct {p0}, Lcom/netease/newsreader/activity/BaseActivity;-><init>()V

    .line 51
    const/4 v0, 0x1

    iput v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->UPDATE:I

    .line 52
    const/4 v0, 0x2

    iput v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->NOTICE:I

    .line 53
    const/4 v0, 0x3

    iput v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->NORMAL:I

    .line 54
    const/4 v0, 0x4

    iput v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->COVER:I

    .line 55
    const/4 v0, 0x5

    iput v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->STOP:I

    .line 56
    const-string v0, "update"

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->UPDATETYPE:Ljava/lang/String;

    .line 60
    const/16 v0, 0xa

    iput v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->delaymillios:I

    .line 61
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->currentdate:Ljava/lang/String;

    .line 63
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->cover_src:Ljava/lang/String;

    .line 64
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->cover_start:Ljava/lang/String;

    .line 65
    const-string v0, ""

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->cover_end:Ljava/lang/String;

    .line 66
    const-string v0, "forceguide"

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->FORCE_GUIDE_NAME:Ljava/lang/String;

    .line 67
    const-string v0, "forcetextsize"

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->FORCE_TEXTSIZE_NAME:Ljava/lang/String;

    .line 68
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->iscancle:Z

    .line 283
    new-instance v0, Lcom/netease/newsreader/activity/MainIndexActivity$1;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/activity/MainIndexActivity$1;-><init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->delaystart:Ljava/lang/Runnable;

    .line 302
    iput-boolean v1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->stopflag:Z

    .line 303
    new-instance v0, Lcom/netease/newsreader/activity/MainIndexActivity$2;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/activity/MainIndexActivity$2;-><init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->handler:Landroid/os/Handler;

    .line 358
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->dialog:Landroid/app/AlertDialog;

    .line 49
    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/activity/MainIndexActivity;)Z
    .locals 1
    .parameter

    .prologue
    .line 68
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->iscancle:Z

    return v0
.end method

.method static synthetic access$1(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/os/Handler;
    .locals 1
    .parameter

    .prologue
    .line 303
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->handler:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$10(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 64
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->cover_start:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$11(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 65
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->cover_end:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$12(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 58
    iput-object p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->version:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$13(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 58
    iput-object p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->title:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$14(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 58
    iput-object p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->message:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$15(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 58
    iput-object p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->type:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$16(Lcom/netease/newsreader/activity/MainIndexActivity;Lorg/json/JSONArray;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 59
    iput-object p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->custom_default:Lorg/json/JSONArray;

    return-void
.end method

.method static synthetic access$17(Lcom/netease/newsreader/activity/MainIndexActivity;)Lorg/json/JSONArray;
    .locals 1
    .parameter

    .prologue
    .line 59
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->custom_default:Lorg/json/JSONArray;

    return-object v0
.end method

.method static synthetic access$18(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 63
    iput-object p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->cover_src:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$19(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 64
    iput-object p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->cover_start:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$2(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/Runnable;
    .locals 1
    .parameter

    .prologue
    .line 283
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->delaystart:Ljava/lang/Runnable;

    return-object v0
.end method

.method static synthetic access$20(Lcom/netease/newsreader/activity/MainIndexActivity;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 65
    iput-object p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->cover_end:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$21(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 58
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->type:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$22(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 58
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->version:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$23(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 58
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->message:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$3(Lcom/netease/newsreader/activity/MainIndexActivity;)Z
    .locals 1
    .parameter

    .prologue
    .line 302
    iget-boolean v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->stopflag:Z

    return v0
.end method

.method static synthetic access$4(Lcom/netease/newsreader/activity/MainIndexActivity;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 302
    iput-boolean p1, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->stopflag:Z

    return-void
.end method

.method static synthetic access$5(Lcom/netease/newsreader/activity/MainIndexActivity;)I
    .locals 1
    .parameter

    .prologue
    .line 60
    iget v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->delaymillios:I

    return v0
.end method

.method static synthetic access$6(Lcom/netease/newsreader/activity/MainIndexActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 360
    invoke-direct {p0}, Lcom/netease/newsreader/activity/MainIndexActivity;->setAlertContext()V

    return-void
.end method

.method static synthetic access$7(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/app/AlertDialog;
    .locals 1
    .parameter

    .prologue
    .line 358
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->dialog:Landroid/app/AlertDialog;

    return-object v0
.end method

.method static synthetic access$8(Lcom/netease/newsreader/activity/MainIndexActivity;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 63
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->cover_src:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$9(Lcom/netease/newsreader/activity/MainIndexActivity;)Landroid/content/SharedPreferences;
    .locals 1
    .parameter

    .prologue
    .line 57
    iget-object v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    return-object v0
.end method

.method private setAlertContext()V
    .locals 11

    .prologue
    const/16 v10, 0x8

    .line 361
    iget-object v7, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->dialog:Landroid/app/AlertDialog;

    if-nez v7, :cond_0

    .line 362
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 363
    .local v0, b:Landroid/app/AlertDialog$Builder;
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v7

    iput-object v7, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->dialog:Landroid/app/AlertDialog;

    .line 364
    iget-object v7, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->dialog:Landroid/app/AlertDialog;

    invoke-virtual {p0}, Lcom/netease/newsreader/activity/MainIndexActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v8

    const v9, 0x1080027

    invoke-virtual {v8, v9}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v8

    invoke-virtual {v7, v8}, Landroid/app/AlertDialog;->setIcon(Landroid/graphics/drawable/Drawable;)V

    .line 365
    iget-object v7, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->dialog:Landroid/app/AlertDialog;

    iget-object v8, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->title:Ljava/lang/String;

    invoke-virtual {v7, v8}, Landroid/app/AlertDialog;->setTitle(Ljava/lang/CharSequence;)V

    .line 366
    iget-object v7, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->dialog:Landroid/app/AlertDialog;

    iget-object v8, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->message:Ljava/lang/String;

    invoke-virtual {v7, v8}, Landroid/app/AlertDialog;->setMessage(Ljava/lang/CharSequence;)V

    .line 367
    iget-object v7, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->dialog:Landroid/app/AlertDialog;

    const/4 v8, 0x0

    invoke-virtual {v7, v8}, Landroid/app/AlertDialog;->setCancelable(Z)V

    .line 369
    const-string v7, "layout_inflater"

    invoke-virtual {p0, v7}, Lcom/netease/newsreader/activity/MainIndexActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/view/LayoutInflater;

    .line 370
    .local v3, inflater:Landroid/view/LayoutInflater;
    const v7, 0x7f030005

    const/4 v8, 0x0

    invoke-virtual {v3, v7, v8}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v6

    .line 372
    .local v6, v:Landroid/view/View;
    iget-object v7, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->dialog:Landroid/app/AlertDialog;

    invoke-virtual {v7, v6}, Landroid/app/AlertDialog;->setView(Landroid/view/View;)V

    .line 374
    const v7, 0x7f0c0026

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/CheckBox;

    .line 375
    .local v1, c:Landroid/widget/CheckBox;
    const v7, 0x7f0c0023

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/Button;

    .line 376
    .local v5, update:Landroid/widget/Button;
    const v7, 0x7f0c0025

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/Button;

    .line 377
    .local v4, ok:Landroid/widget/Button;
    const v7, 0x7f0c0024

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/Button;

    .line 379
    .local v2, cancel:Landroid/widget/Button;
    const-string v7, "update"

    iget-object v8, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->type:Ljava/lang/String;

    invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_1

    .line 380
    invoke-virtual {v4, v10}, Landroid/widget/Button;->setVisibility(I)V

    .line 386
    :goto_0
    new-instance v7, Lcom/netease/newsreader/activity/MainIndexActivity$6;

    invoke-direct {v7, p0}, Lcom/netease/newsreader/activity/MainIndexActivity$6;-><init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V

    invoke-virtual {v1, v7}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 399
    new-instance v7, Lcom/netease/newsreader/activity/MainIndexActivity$7;

    invoke-direct {v7, p0}, Lcom/netease/newsreader/activity/MainIndexActivity$7;-><init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V

    invoke-virtual {v5, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 413
    new-instance v7, Lcom/netease/newsreader/activity/MainIndexActivity$8;

    invoke-direct {v7, p0}, Lcom/netease/newsreader/activity/MainIndexActivity$8;-><init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V

    invoke-virtual {v4, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 423
    new-instance v7, Lcom/netease/newsreader/activity/MainIndexActivity$9;

    invoke-direct {v7, p0}, Lcom/netease/newsreader/activity/MainIndexActivity$9;-><init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V

    invoke-virtual {v2, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 433
    .end local v0           #b:Landroid/app/AlertDialog$Builder;
    .end local v1           #c:Landroid/widget/CheckBox;
    .end local v2           #cancel:Landroid/widget/Button;
    .end local v3           #inflater:Landroid/view/LayoutInflater;
    .end local v4           #ok:Landroid/widget/Button;
    .end local v5           #update:Landroid/widget/Button;
    .end local v6           #v:Landroid/view/View;
    :cond_0
    return-void

    .line 382
    .restart local v0       #b:Landroid/app/AlertDialog$Builder;
    .restart local v1       #c:Landroid/widget/CheckBox;
    .restart local v2       #cancel:Landroid/widget/Button;
    .restart local v3       #inflater:Landroid/view/LayoutInflater;
    .restart local v4       #ok:Landroid/widget/Button;
    .restart local v5       #update:Landroid/widget/Button;
    .restart local v6       #v:Landroid/view/View;
    :cond_1
    invoke-virtual {v5, v10}, Landroid/widget/Button;->setVisibility(I)V

    .line 383
    invoke-virtual {v2, v10}, Landroid/widget/Button;->setVisibility(I)V

    goto :goto_0
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 12
    .parameter "savedInstanceState"

    .prologue
    .line 83
    invoke-super {p0, p1}, Lcom/netease/newsreader/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    .line 84
    const/4 v9, 0x1

    invoke-virtual {p0, v9}, Lcom/netease/newsreader/activity/MainIndexActivity;->requestWindowFeature(I)Z

    .line 85
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/MainIndexActivity;->getWindow()Landroid/view/Window;

    move-result-object v9

    const/16 v10, 0x400

    .line 86
    const/16 v11, 0x400

    .line 85
    invoke-virtual {v9, v10, v11}, Landroid/view/Window;->setFlags(II)V

    .line 87
    const v9, 0x7f030038

    invoke-virtual {p0, v9}, Lcom/netease/newsreader/activity/MainIndexActivity;->setContentView(I)V

    .line 88
    const-string v9, "yyyy-MM-dd HH:mm:ss"

    invoke-static {v9}, Lcom/netease/newsreader/util/StringUtil;->getCurrnetDate(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    iput-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->currentdate:Ljava/lang/String;

    .line 89
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v9

    iput-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    .line 91
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    const-string v10, "cover"

    const-string v11, ""

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 92
    .local v2, display_cover:Ljava/lang/String;
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    const-string v10, "cover_start"

    const-string v11, "1979-01-01 00:00:00"

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .line 93
    .local v4, display_start:Ljava/lang/String;
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    const-string v10, "cover_end"

    const-string v11, "1979-01-01 00:00:00"

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 95
    .local v3, display_end:Ljava/lang/String;
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->currentdate:Ljava/lang/String;

    invoke-virtual {v9, v4}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I

    move-result v9

    if-ltz v9, :cond_0

    .line 96
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->currentdate:Ljava/lang/String;

    invoke-virtual {v9, v3}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I

    move-result v9

    if-gtz v9, :cond_0

    .line 97
    const-string v9, ""

    invoke-virtual {v9, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v9

    if-nez v9, :cond_0

    .line 100
    const v9, 0x7f0c00ed

    :try_start_0
    invoke-virtual {p0, v9}, Lcom/netease/newsreader/activity/MainIndexActivity;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Landroid/view/ViewStub;

    iput-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->viewstub_ad:Landroid/view/ViewStub;

    .line 101
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->viewstub_ad:Landroid/view/ViewStub;

    invoke-virtual {v9}, Landroid/view/ViewStub;->inflate()Landroid/view/View;

    move-result-object v8

    .line 102
    .local v8, vad:Landroid/view/View;
    const v9, 0x7f0c002c

    invoke-virtual {v8, v9}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    .line 103
    .local v0, adimg:Landroid/widget/ImageView;
    invoke-static {v2, p0}, Lcom/netease/newsreader/util/PicUtil;->getCoverUrl(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    .line 104
    const-string v9, "/"

    invoke-virtual {v2, v9}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v9

    add-int/lit8 v9, v9, 0x1

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v10

    invoke-virtual {v2, v9, v10}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v9

    invoke-static {v9}, Lcom/netease/newsreader/util/PicUtil;->readTempJPEGFile(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 105
    .local v1, bitmap:Landroid/graphics/Bitmap;
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 106
    const/16 v9, 0x7d0

    iput v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->delaymillios:I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 118
    .end local v0           #adimg:Landroid/widget/ImageView;
    .end local v1           #bitmap:Landroid/graphics/Bitmap;
    .end local v8           #vad:Landroid/view/View;
    :cond_0
    :goto_0
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    iget-object v10, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->FORCE_GUIDE_NAME:Ljava/lang/String;

    const/4 v11, -0x1

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v6

    .line 119
    .local v6, force_count:I
    if-gez v6, :cond_1

    .line 120
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    invoke-interface {v9}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    iget-object v10, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->FORCE_GUIDE_NAME:Ljava/lang/String;

    const/4 v11, 0x0

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    invoke-interface {v9}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 121
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    invoke-interface {v9}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    const-string v10, "newsreaderguide"

    const/4 v11, 0x1

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    invoke-interface {v9}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 122
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    invoke-interface {v9}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    const-string v10, "detailpageguide"

    const/4 v11, 0x1

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    invoke-interface {v9}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 124
    :cond_1
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    iget-object v10, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->FORCE_TEXTSIZE_NAME:Ljava/lang/String;

    const/4 v11, -0x1

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v6

    .line 125
    if-gez v6, :cond_2

    .line 126
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    invoke-interface {v9}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    iget-object v10, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->FORCE_TEXTSIZE_NAME:Ljava/lang/String;

    const/4 v11, 0x0

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    invoke-interface {v9}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 127
    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->sp:Landroid/content/SharedPreferences;

    invoke-interface {v9}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    const-string v10, "currentSizeId"

    const/4 v11, 0x2

    invoke-interface {v9, v10, v11}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    invoke-interface {v9}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 132
    :cond_2
    new-instance v9, Lcom/netease/newsreader/activity/MainIndexActivity$3;

    invoke-direct {v9, p0}, Lcom/netease/newsreader/activity/MainIndexActivity$3;-><init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V

    .line 138
    invoke-virtual {v9}, Lcom/netease/newsreader/activity/MainIndexActivity$3;->start()V

    .line 140
    invoke-static {p0}, Lcom/netease/newsreader/util/Tools;->CheckNetwork(Landroid/content/Context;)Z

    move-result v7

    .line 141
    .local v7, isAvailable:Z
    if-eqz v7, :cond_3

    iget-object v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->app:Lcom/netease/newsreader/activity/MyApplication;

    invoke-static {v9}, Lcom/netease/newsreader/util/Tools;->isWifi(Landroid/content/Context;)Z

    move-result v9

    if-eqz v9, :cond_3

    .line 142
    new-instance v9, Lcom/netease/newsreader/activity/MainIndexActivity$4;

    invoke-direct {v9, p0}, Lcom/netease/newsreader/activity/MainIndexActivity$4;-><init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V

    .line 151
    invoke-virtual {v9}, Lcom/netease/newsreader/activity/MainIndexActivity$4;->start()V

    .line 155
    :cond_3
    new-instance v9, Lcom/netease/newsreader/activity/MainIndexActivity$5;

    invoke-direct {v9, p0}, Lcom/netease/newsreader/activity/MainIndexActivity$5;-><init>(Lcom/netease/newsreader/activity/MainIndexActivity;)V

    .line 279
    invoke-virtual {v9}, Lcom/netease/newsreader/activity/MainIndexActivity$5;->start()V

    .line 281
    return-void

    .line 107
    .end local v6           #force_count:I
    .end local v7           #isAvailable:Z
    :catch_0
    move-exception v5

    .line 109
    .local v5, e:Ljava/lang/Exception;
    invoke-virtual {v5}, Ljava/lang/Exception;->printStackTrace()V

    .line 110
    const/16 v9, 0x3e8

    iput v9, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->delaymillios:I

    goto/16 :goto_0
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 1
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 73
    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    .line 74
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/netease/newsreader/activity/MainIndexActivity;->iscancle:Z

    .line 76
    :cond_0
    invoke-super {p0, p1, p2}, Lcom/netease/newsreader/activity/BaseActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    return v0
.end method
